<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            height:2000px;
        }
        .w{
            width:1222px;
            height:300px;
            background-color: #ff8500;
            margin: 100px auto;
        }
        .totop{
            /*固定定位相对于当前的可视区域*/
            position: fixed;
            right:80px;
            bottom: 80px;

            width: 80px;
            height:80px;
            text-align: center;
            border:1px solid darkgoldenrod;
        }

    </style>
</head>
<body>
<div class="w"></div>
<div class="totop">回到顶部</div>
</body>
</html>